package com.java.day4carsystem.entity;

/**
 *  货车
 */
public class Van extends Vehicle {

    public Van(String number, String type, float price, String color, float gasValue, int size) {
        super(number, type, price, color, gasValue);
        this.size = size;
    }

    public Van() {
    }

    private int size;

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    @Override
    public float calculateRentPrice(int days) {
        return 1200 * days + size * 80;
    }

    @Override
    public void print() {
        System.out.println("货车 车牌号：" + this.getNumber() +",颜色：" + this.getColor() +",型号：" + this.getType() +
                ",价格：" + this.getPrice() +",载重：" + this.getSize());
    }
}
